package c.e.a.b.e.c;

/* compiled from: com.google.android.gms:play-services-measurement-base@@18.0.0 */
public final class v4 implements b6 {
    public static final v4 a = new v4();

    public final boolean a(Class<?> cls) {
        return u4.class.isAssignableFrom(cls);
    }

    public final c6 b(Class<?> cls) {
        String name;
        Class cls2 = u4.class;
        if (cls2.isAssignableFrom(cls)) {
            try {
                return (c6) u4.l(cls.asSubclass(cls2)).o(3, null, null);
            } catch (Exception e) {
                String str = "Unable to get message info for ";
                name = cls.getName();
                throw new RuntimeException(name.length() != 0 ? str.concat(name) : new String(str), e);
            }
        }
        String str2 = "Unsupported message type: ";
        name = cls.getName();
        throw new IllegalArgumentException(name.length() != 0 ? str2.concat(name) : new String(str2));
    }
}
